<template>
	<div class="uni-margin-wrap">
		<swiper :show-desc-mask="false" auto dots-position="center" height="50vw">
			<swiper-item :key="index" @click.native="handleAction(item)" v-for="(item,index) in value.imgList">
				<img :src="item.imgUrl" style="height: 100%;width: 100%;">
			</swiper-item>
		</swiper>
	</div>
</template>

<script>
	export default {
		name: "m-carousel-img",
		props: {
			value: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		data() {
			return {
				dataList: []
			};
		},
		computed: {},
		watch: {
			item(val) {
				this.$forceUpdate();
			},
		},
		created() {},
		methods: {
			handleAction(item) {
				uni.navigateTo({
					url: item.imgLink
				})
			},
		}
	}
</script>

<style scoped>
	.uni-margin-wrap {
		width: 690rpx;
		margin: 30rpx;
	}

	.swiper {
		height: 300rpx;
	}

	.swiper-item {
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
	}

	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}
</style>
